package com.banksoft.cps.util;

import com.banksoft.cps.bean.User;

/**
 * Created by rongzhao.zhu on 2017/12/19.
 */
public class UserContext {
    private static ThreadLocal<User>  userThreadLocal = new ThreadLocal<>();
    public static User getUser(){
        return userThreadLocal.get();
    }
    public static void setUser(User user){
        userThreadLocal.set(user);
    }
    public static void release() {
        userThreadLocal.remove();
    }

}
